home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGMISC
/
MODULTUB.LZH
/
LOCMOD2.MOD
< prev
next >
Wrap
Text File
|
1989-01-18
|
1KB
|
45 lines
(* Chapter 13 - Program 2 *)
MODULE LocMod2;
FROM InOut IMPORT WriteString, WriteCard, WriteLn;
VAR Index : CARDINAL;
MODULE MyStuff;
IMPORT WriteString, WriteCard, WriteLn;
EXPORT QUALIFIED WriteStuff;
VAR Counter : CARDINAL;
PROCEDURE WriteStuff;
BEGIN
Counter := Counter + 3;
WriteString("The value of the counter is ");
WriteCard(Counter,8);
WriteLn;
END WriteStuff;
BEGIN
Counter := 4;
END MyStuff;
BEGIN (* Main program *)
FOR Index := 1 TO 8 DO
MyStuff.WriteStuff;
END;
END LocMod2.
(* Result of execution
The value of the counter is 7
The value of the counter is 10
The value of the counter is 13
The value of the counter is 16
The value of the counter is 19
The value of the counter is 22
The value of the counter is 25
The value of the counter is 28
*)